// 测试hello
package controller

import (
	"github.com/gin-gonic/gin"
	"net/http"
	"pass-config/service"
)

func SayHello(c *gin.Context) {
	var sayService service.SayHello

	str, err := sayService.Say(c.Query("name"))
	if err != nil {
		c.JSON(http.StatusOK, gin.H{
			"code":    -1,
			"message": "SayHello() error!",
		})
		return
	}
	c.JSON(http.StatusOK, gin.H{
		"code":    1,
		"message": str,
	})

}
